{include file="stddecor.form.open.tpl" }
<table cellspacing="0" class="objHeader">
<tr>
    <td class="objHeader-td-icon"><img src="{$SPIcfg.dir.pubsite_styles|escape}manage/image/topic_icons/{$data.topic|escape}.gif" /></td>
    <td class="objHeader-td-header">
        <div>
            <h1>{$data.title|escape}</h1>
            <h2>{$data.subtitle|escape}</h2>
        </div>

        <div class="objHeader-action_buttons">
            <div class="right">{include file="obj.button.tpl" name="Назад" link=$data.link_back icon="back" }</div>
            <br class="clear" />
        </div>
    </td>
</tr>
</table>
{include file="stddecor.form.close.tpl" }

{* ************************************************************************* *}

{include file="media/manager.tpl" item_title="Фотография/Аватар" media=$content.media }

{* ************************************************************************* *}

{include file="stddecor.form.open.tpl" }

<form id="cntForm" name="cntForm" method="post" action="{$data.link_form_submit|escape}">
{foreach from=$data.formvars key=varname item=varvalue }
<input type="hidden" name="{$varname|escape}" value="{$varvalue|escape}" />
{/foreach}

<center>
<table cellspacing="8" class="cntForm">


<tr>
    <td class="cntForm-td-title"><div>Тип профиля:</div></td>
    <td class="cntForm-td-object">
        {foreach from=$data.list_permissions key=perm_key item=perm_name }
            <div class="left" style="width: 160px;">
                <input type="radio" name="field[permissions]" value="{$perm_key|escape}" {if $content.item_fields.permissions_keys.$perm_key === true } checked="checked"{/if} /> {$perm_name|escape}
            </div>
        {/foreach}
        <br class="clear" />
    </td>
    <td class="cntForm-td-error buggy_obj buggy_obj__permissions"></td>
</tr>

{if $data.is_selfitem_form !== true }
    <tr>
        <td class="cntForm-td-title"><div>Активность:</div></td>
        <td class="cntForm-td-object">
            <select class="select" name="field[workstatus]">
                <option value="1"{if '1' == $content.item_fields.workstatus } selected="selected"{/if}>Включено</option>
                <option value="0"{if '0' == $content.item_fields.workstatus } selected="selected"{/if}>Выключено</option>
            </select>
        </td>
        <td class="cntForm-td-error buggy_obj buggy_obj__workstatus"></td>
    </tr>
{else}
    <tr>
        <td class="cntForm-td-title"><div>Активность:</div></td>
        <td class="cntForm-td-object"><strong>Включено</strong></td>
        <td class="cntForm-td-error"></td>
    </tr>
{/if}

<tr><td>&nbsp;</td></tr>

<tr>
    <td class="cntForm-td-title"><div>Имя:</div></td>
    <td class="cntForm-td-object">
        <input type="text" class="text" name="field[fname]" value="{$content.item_fields.fname|escape}" maxlength="64" style="width: 66%;" />
    </td>
    <td class="cntForm-td-error buggy_obj buggy_obj__fname"></td>
</tr>

<tr>
    <td class="cntForm-td-title"><div>Фамилия:</div></td>
    <td class="cntForm-td-object">
        <input type="text" class="text" name="field[lname]" value="{$content.item_fields.lname|escape}" maxlength="64" style="width: 66%;" />
    </td>
    <td class="cntForm-td-error buggy_obj buggy_obj__lname"></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr>
    <td class="cntForm-td-title"><div>Пол:</div></td>
    <td class="cntForm-td-object">
        <select class="select" name="field[sex]" style="width: 40%;">
            <option value=""{if '' === $content.item_fields.sex } selected="selected"{/if}>&lt;не указано&gt;</option>
            <option value="male"{if 'male' == $content.item_fields.sex } selected="selected"{/if}>Мужской</option>
            <option value="female"{if 'female' == $content.item_fields.sex } selected="selected"{/if}>Женский</option>
        </select>
    </td>
    <td class="cntForm-td-error buggy_obj buggy_obj__sex"></td>
</tr>

<tr>
    <td class="cntForm-td-title"><div>Дата рождения:</div></td>
    <td class="cntForm-td-object">
        <input type="text" class="text handler__jQueryUI__datepicker" name="field[birthday]" value="{$content.item_fields.birthday|escape}" style="width: 40%" maxlength="10" />
    </td>
    <td class="cntForm-td-error buggy_obj buggy_obj__birthday"></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr>
    <td class="cntForm-td-title"><div>E-mail:</div></td>
    <td class="cntForm-td-object">
        <input type="text" class="text" name="field[email]" value="{$content.item_fields.email|escape}" maxlength="64" />
    </td>
    <td class="cntForm-td-error buggy_obj buggy_obj__email"></td>
</tr>

<tr>
    <td class="cntForm-td-title"><div>Пароль:</div></td>
    <td class="cntForm-td-object">
        <input type="text" class="text" name="field[passwd]" value="" maxlength="32" style="width: 40%" autocomplete="off" />
    </td>
    <td class="cntForm-td-error buggy_obj buggy_obj__passwd"></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr>
    <td class="cntForm-td-title"><div>Информация о пользователе:</div></td>
    <td class="cntForm-td-object" colspan="2">
        {include file="widget/spaw2.tpl" varname="field[description]" editor_varname=description_ExtEditor editor=$content.item_fields.description_ExtEditor }
    </td>
</tr>

<tr><td>&nbsp;</td></tr>

{if $content.item_fields.t_created }
<tr>
    <td class="cntForm-td-title"><div class="light">Дата создания:</div></td>
    <td class="cntForm-td-object"><div class="light">{$content.item_fields.t_created|date}</div></td>
    <td></td>
</tr>
{/if}

{if $content.item_fields.t_updated }
<tr>
    <td class="cntForm-td-title"><div class="light">Дата модификации:</div></td>
    <td class="cntForm-td-object"><div class="light">{$content.item_fields.t_updated|date}</div></td>
    <td></td>
</tr>
{/if}

</table>

<div class="splitter padded"></div>

<table cellspacing="8" cellpadding="0">
<tr>
    <td>{include file="obj.button.tpl" name="Сохранить" onclick="cntForm_submit()" icon="save" }</td>
    <td width="25">&nbsp;</td>
    <td>{include file="obj.button.tpl" name="Отменить" link=$data.link_back icon="cancel" }</td>
</tr>
</table>

</center>

</form>
{include file="stddecor.form.close.tpl" }

{* ************************************************************************* *}

{if $content.media_gallery }
    <br />
    {include file="media/manager.tpl" title="Дополнительные фотографии" item_title="Фото %s" media=$content.media_gallery }
{/if}

{* ************************************************************************* *}
